<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<TITLE>HH_SET_WIN_TYPE command</TITLE>
<style>@import url(coUA.css);</style>
<link disabled rel="stylesheet" href="htmlhelp.css">
</head>

<BODY>
<h1>HH_SET_WIN_TYPE command</h1>

<P>Creates a new help window or modifies an existing help window at run time.</P>

<br>
<table border=1 cellpadding=3 cellspacing=0 width=100%>
<TR VALIGN="top">
<TH><I>pszFile</I></TH>
<TH><I>dwData</I></TH>
</TR>

<TR VALIGN="top">
<TD>
<p>Specifies the name of the window type that you want to create or modify and the name of the compiled help (.chm) file in which the window type is defined.</p>

<p>The window type name must begin with a greater-than (&gt;) character and must be preceded by the name of the compiled help file in which it is defined.</p>
</TD>
<TD>
Points to an <a href="str_hh_wintype.htm">HH_WINTYPE</a> structure. 
</TD>
</TR>
</TABLE>
<BR>

<H2>Example</H2>
<pre><code>
HH_WINTYPE WinType ;
<br>...
<br>
<br>HtmlHelp(
<br>          GetDesktopWindow(),
<br>          "..\\help.chm>mainwin",
<br>          HH_SET_WIN_TYPE,
<br>          (DWORD) &WinType) ;
</pre></code>

<H2>Return value</H2>
<ul>
<li>On success, the handle (hwnd) of the help window.</li>
<li>On success, NULL, if the help window has not yet been created.</li>
<li>On failure, NULL, if the specified window type has not been defined.</li>
</ul>

<H2>Comments</H2>
<ul>
<li>Using the window type specified in <i>pszFile</i> to display multiple compiled help files is permitted, but not recommended.</li>  

<li>Always specify the name of the compiled help file in which the window type is defined when calling an API command. If the window type is not defined in a help file, then specify NULL.</li>

<li>If a NULL is passed to <b>HH_SET_WIN_TYPE</b>, the name of the window type is placed into an array and is treated as a <a href="wintypes_global.htm">global window type</a>. A global window type is a window type that is not specific to a particular compiled help file. Only use global window types if you require backward compatibility for existing applications.</li>
</ul>

<H2>See also</H2>
<p><a href="cmd_hh_get_win_type.htm">HH_GET_WIN_TYPE</a></p>

<br>
<table border="0" cellpadding="0" cellspacing="4">
<tr>
<td valign="top"><a href="ov_about_htmlhelp_commands.htm"><img src="home.gif" width=20 height=18 alt="link to overview topic" border="0"></a>
</td>
<td><a href="ov_about_htmlhelp_commands.htm">About commands</A>
</td>
</tr>
<tr>
<td>&nbsp;
</td>
</tr>
</table>

<br>
<!--start keywords--->

<!--end keywords--->


</BODY>
</HTML>
